package com.sojson.util.linux;

import java.io.InputStream;
import java.util.List;

import com.sojson.base.impl.BaseUtilDto;

import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.Session;

/**
 * LinuxBean对象
 * 
 * @author liu
 * @date 2020-07-31
 */
public class LinuxBean extends BaseUtilDto {

    /***/
    private static final long serialVersionUID = -5038611744959641413L;
    /**Linux服务器返回的状态码*/
    private Integer status;
    /**Linux执行命令后返回的控制台信息集合*/
    private List<String> resuList;
    /**Linux执行命令后返回的输入流*/
    private InputStream inputStream;
    /**Linux命令执行失败后的错误信息*/
    private String errMessage;

    /** 单个连接,顶级连接,比如:一级连接 */
    private Connection conn;
    /** 单个连接,顶级连接,比如:一级连接 */
    private Session sess;
    /** 一组连接,比如:三级连接,二级连接,一级连接... */
    private List<Object> conns;
    /** 多组连接,每组除顶级外都是List,顶级是一个Object,比如:{三级连接...},{二级连接...},顶级连接 */
    private List<Object> connsList;

    public LinuxBean() {}

    public LinuxBean(Integer status) {
        super();
        this.status = status;
    }

    public LinuxBean(Integer status, List<String> resuList) {
        super();
        this.status = status;
        this.resuList = resuList;
    }

    public LinuxBean(Integer status, InputStream inputStream) {
        super();
        this.status = status;
        this.inputStream = inputStream;
    }

    public LinuxBean(Integer status, String errMessage) {
        super();
        this.status = status;
        this.errMessage = errMessage;
    }

    public LinuxBean(Connection conn) {
        this.conn = conn;
    }

    /**获取Linux服务器返回的状态码*/
    public Integer getStatus() {
        return status;
    }

    /**设置Linux服务器返回的状态码*/
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**获取Linux执行命令后返回的控制台信息集合*/
    public List<String> getResuList() {
        return resuList;
    }

    /**获取Linux执行命令后返回的控制台信息集合*/
    public void setResuList(List<String> resuList) {
        this.resuList = resuList;
    }

    /**获取Linux执行命令后返回的输入流*/
    public InputStream getInputStream() {
        return inputStream;
    }

    /**获取Linux执行命令后返回的输入流*/
    public void setInputStream(InputStream inputStream) {
        this.inputStream = inputStream;
    }

    /**获取Linux命令执行失败后的错误信息*/
    public String getErrMessage() {
        return errMessage;
    }

    /**设置Linux命令执行失败后的错误信息*/
    public void setErrMessage(String errMessage) {
        this.errMessage = errMessage;
    }

    public Connection getConn() {
        return conn;
    }

    public void setConn(Connection conn) {
        this.conn = conn;
    }

    public Session getSess() {
        return sess;
    }

    public void setSess(Session sess) {
        this.sess = sess;
    }

    public List<Object> getConns() {
        return conns;
    }

    public void setConns(List<Object> conns) {
        this.conns = conns;
    }

    public List<Object> getConnsList() {
        return connsList;
    }

    public void setConnsList(List<Object> connsList) {
        this.connsList = connsList;
    }

}